<template>
	<view class="cu-page album-page">
	    <nav-bar :hideBack="true" title="专题"></nav-bar>
	    <view class="album-item" v-for="(item,index) in albumList" :key="index">
	        <image class="album-item-image" mode="aspectFill" :src="item.cover_url"></image>
	    </view>
	    <cu-end-empty></cu-end-empty>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				albumList:[],
				isLoader:0
			}
		},
		methods: {
			
		},
		created:function(){
			
		},
		props: {
			display: {
				type: Number,
				default: ""
			},
		},
		watch:{
			display:function(val){
				if(val == 2){
					if(!this.isLoader){
						uni.request({
							url: this.$globals.siteUrl+'/zt.php', //仅为示例，并非真实接口地址。
							success: (res) => {
								console.log("request success")
								console.log(res.data)
								if(res.data.success){
									this.albumList = res.data.data.data
								}
								//console.log(res.data.data.data)
							}
						});
						this.isLoader = 1
					}
					uni.$emit('updateSwiperHeight',{'isTimes':true})
				}
			}
		}
	}
</script>

<style scoped>
.album-page {
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    flex-direction: column;
    -webkit-box-align: center;
    align-items: center;
}

.album-item {
    background-color: #000;
    margin-top: 30rpx;
}

.album-item-image,.album-item {
    width: 690rpx;
    height: 280rpx;
    border-radius: 12rpx;
}
</style>
